package br.com.contaBar.controller;

import java.util.ArrayList;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

import br.com.contaBar.model.bd.Cliente;
import br.com.contaBar.model.dao.ClienteDao;

@RequestScoped
@ManagedBean(name = "clienteBean")
public class ClienteBean {

	private ClienteDao clienteDao = new ClienteDao();
	private ArrayList<Cliente> clientes;
	private Cliente cliente;

	public ClienteBean() {

		clientes = new ArrayList<Cliente>();
		clientes = (ArrayList<Cliente>) clienteDao.findAll();

	}

	public ArrayList<Cliente> getClientes() {
		return clientes;
	}

	public void setClientes(ArrayList<Cliente> clientes) {
		this.clientes = clientes;
	}

	public Cliente getCliente() {
		return cliente;
	}

	public void setCliente(Cliente cliente) {
		this.cliente = cliente;
	}

}
